1 #ifndef BOOK_H
2 #define BOOK_H
3
4 #include <string>
5 #include <iostream>
6 #include <fstream>
7
8 using namespace std;
9
10 enum condition { excellent, good, fair, poor };
11 class Book
12 {
13 friend istream& operator>>(istream& ins, Book& tempBook);
14 public:
15 Book();
16 void setBook(const string& newBookID, const string& newTitle, const string& newAuthor, const string& newPublisher,
17 int newPublication, int newEditon, int newCost, int newRetailPrice);
18 void addNewBook(istream& ins);
19 string getBookID() const;
20 string getTitle() const;
21 string getAuthor() const;
22 string getPublisher() const;
23 condition getCondition() const;
24 int getPublication() const;
25 int getEdition()const;
26 int getCost() const;
27 int getRetail()const;
28 void setBookID(const string& newID);
29 void setTitle(const string& newTitle);
30 void setPublisher(const string& newPublisher);
31 void setAuthor(const string& newAuthor);
32 void setCondition(condition& newCondition);
33 void setPublication(int newPublication);
34 void setEdition(int newEdition);
35 void setCost(int newCost);
36 void setRetailPrice(int newRetailPrice);
37 void printBook() const;
38 void printBookToFile(ofstream& out);
39 ~Book();
40 private:
41 string bookID, title, publisher, author;
42 int publication, edition, cost, retailPrice;
43 condition bookCondition;
44 bool isSold;
45 };
46
47 #endif // !